/* 文件路径：frontend/static/css/user_management.css */
/* 功能说明：用户管理页面的专用样式，控制用户列表、创建用户表单等样式 */


/* 仅覆盖用户管理页需要的样式 */
.user-management-content {
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 表格增强样式 */
.user-table {
  margin-top: 20px;
}
.user-table th {
  background-color: #f8f9fa;  /* 与导航栏风格一致 */
}

/* 模态框样式（不影响全局） */
.modal-container {
  display: none;
  position: fixed;
  top: 0;
  left: var(--current-sidebar-width); /* 与侧边栏联动 */
  width: calc(100% - var(--current-sidebar-width));
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1050; /* 高于侧边栏 */
  justify-content: center;
  align-items: center;
}
.modal-content {
  background: white;
  padding: 20px;
  width: 500px;
  border-radius: 8px;
}

/* 按钮扩展样式 */
.btn-submit {
  background-color: #28a745; /* 绿色提交按钮 */
  color: white;
}

.form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* 权限分配样式 */
.role-edit-modal {
  width: 800px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
}

.permission-assignment {
  margin-top: 20px;
  border-top: 1px solid #eee;
  padding-top: 20px;
}

.permission-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.permission-groups {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

.permission-group {
  border-bottom: 1px solid #eee;
}

.permission-group:last-child {
  border-bottom: none;
}

.permission-group-header {
  background-color: #f1f3f4;
  padding: 12px 15px;
  font-weight: bold;
  color: #495057;
  cursor: pointer;
  user-select: none;
}

.permission-group-header:hover {
  background-color: #e9ecef;
}

.permission-group-content {
  padding: 10px 15px;
}

.permission-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f8f9fa;
}

.permission-item:last-child {
  border-bottom: none;
}

.permission-info {
  flex: 1;
}

.permission-code {
  font-family: monospace;
  font-size: 0.9em;
  color: #6c757d;
}

.permission-name {
  font-weight: 500;
  margin: 2px 0;
}

.permission-description {
  font-size: 0.8em;
  color: #6c757d;
}

.form-actions {
  margin-top: 20px;
  text-align: right;
}

.form-actions .btn {
  margin-left: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}